package com.auth.manager.pojo.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @version 1.0.0
 * @Date: 2022/4/28 20:27
 * @Author ZhuYouBin
 * @Description 系统用户实体
 */
@Data
@NoArgsConstructor
@TableName(value = "sys_user_account")
public class UserInfo implements Serializable {

    /**
     * uid用户唯一标识
     */
    @TableId(type = IdType.AUTO)
    private Integer uid;

    /**
     * 登录账号
     */
    @TableField(value = "account_no")
    @NotBlank(message = "登录账号不能为空")
    @Size(min = 1, max = 20, message = "登录账号长度不能超过20")
    private String accountNo;

    /**
     * 登录密码
     */
    @NotBlank(message = "登录密码不能为空")
    @Size(min = 1, max = 30, message = "登录密码长度不能超过30")
    @TableField(value = "password")
    private String password;

    /**
     * 用户昵称
     */
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 用户邮箱
     */
    @Email
    @TableField(value = "email")
    private String email;

    /**
     * 用户头像
     */
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 性别(male男，female女)
     */
    @TableField(value = "gender")
    private String gender;

    /**
     * 账号是否可用
     */
    @TableField(value = "enabled")
    private String enabled;

    /**
     * 删除标识(01未删除02已删除)
     */
    @TableField(value = "deleted")
    private String deleted;

    /**
     * 注册日期(yyyy-mm-dd hh:mm:ss)
     */
    @TableField(value = "register_time")
    private String registerTime;

}
